1. Field of the Invention
This invention relates to automatically adjusting the orientation of content regions within a page layout when a display device is rotated from portrait to landscape view, or vice versa.
2. Description of the Related Art
The proliferation of handheld computing devices with limited screen sizes has lead to a high demand for software applications that can displayed in either landscape or portrait orientations, depending on a user's viewing preference. Because switching a handheld computing device, such as a smartphone or a tablet computer, between landscape and portrait orientations involves simply adjusting how the device is being held, the user may choose to switch back and forth between orientations at will.
Commonly, when a user rotates the display of the computing device to/from a portrait orientation from/to a landscape orientation, the entire layout of a displayed page rotates as a whole. FIG. 1A illustrates an example layout 101 on a display device of content regions A, B, and C in a portrait orientation. FIG. 1B illustrates the layout 101 of the content regions A, B, and C in a landscape orientation, following a 90 degree rotation. In this example, the content regions stay in their relative positions, with region A across the entire top half of the display, and regions B and C on the bottom half, and change their position with respect to the device itself. In addition, the aspect ratios of each content region changes to accommodate the difference in dimensions between portrait and landscape orientations in their new positions. The layout of the content within a region may change, for example, by reflowing the text of a region across the wider width of the region when the orientation of the page has been changed from portrait orientation to landscape orientation. FIGS. 2A and 2B also show a change from a portrait orientation to a landscape orientation by 90 degree rotation. Here, too, when the orientation of the page has been changed, the full content of a region may no longer fit the page in the new orientation. Whereas in the portrait orientation shown in FIG. 2A, twelve lines of content were visible in each of regions D and E of the layout 102, in the landscape orientation shown in FIG. 2B, only eight lines of content are visible in each of regions D and E. The user may have to resort to scrolling horizontally or vertically in order to view the entire content of the page that was originally formatted for the other orientation.